\documentclass{article}

\usepackage{pgfplots}

\pgfplotsset{compat=1.15}

% \usetikzlibrary{}
% \usepgfplotslibrary{}

\begin{document}

\begin{tikzpicture}
%\tracingcommands=2\tracingmacros=2
	\begin{axis}[xbar,xmax=10]
	\addplot coordinates {(1,1) (11,2)};	
	\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
%\tracingcommands=2\tracingmacros=2
	\begin{axis}[xbar,ymax=2]
	\addplot coordinates {(1,1) (11,2) (3,4)};	
	\end{axis}
\end{tikzpicture}
\end{document}

